﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Http;

namespace Tel_Mes_Interface.Controllers
{
    public class FWSearchController : ApiController
    {

        /// <summary>
        ///查询接口 
        ///type  1表示IP网络，2表示语音电话，3表示短信
        ///value 查询者身份；当是通过ip网络查询时，则填IP地址，当是电话查询时，则填电话号码,不是手机短信查询时，则填手机号码
        ///code  要查询的码
        /// </summary>
        [Route("api/fw/verifiction")]
        [HttpGet]
        public IHttpActionResult FwVerification(string code,string value,int type)
        {
            if (type > 3 || type < 1)
            {
                return Ok("-1^您查找的内容有误^0^0^The content you are lookup is error");
            }
            if (string.IsNullOrWhiteSpace(code) || string.IsNullOrWhiteSpace(value))
            {
                return Ok("-1^参数缺失^0^0^Parameter missing");
            }

            string result =new DB_Service().FwVerifiction(code, value, type);
           return Ok(result);
        }

    }
}